'
' CorrectShortcuts.vbs
' ------------------
'
' Sorts out the shortcuts in the installer so that the Run As Administrator option can be chosen.
'
' Written by Pascal Bourque April 2001
' Modified by Stefan Krueger <skrueger@installsite.org> 2001-09-26
' Adapted by Scott Lovegrove 2009-02-25
'
'D:\Documents\Visual Studio 2008\Projects\LiveWriterBackupWPF\LiveWriterBackupWPFSetup\Release\LiveWriterBackupWPFSetup.msi

Dim xInst
Dim xDB
Dim xView

Set xInst = CreateObject("WindowsInstaller.Installer")
Set xDB = xInst.OpenDatabase(WScript.Arguments(0), 1)
'Set xDB = xInst.OpenDatabase("D:\Documents\Visual Studio 2008\Projects\LiveWriterBackupWPF\LiveWriterBackupWPFSetup\Release\LiveWriterBackupWPFSetup.msi", 1)

Set xView = xDB.OpenView("INSERT INTO `Property` (`Property`,`Value`) VALUES ('DISABLEADVTSHORTCUTS', '1')")    
Call xView.Execute
Set xView = Nothing

'Set xView = xDB.OpenView("UPDATE `Control` SET `X`=4, `Width`=366 WHERE `Control` ='DlgLine'")    
'Call xView.Execute
'Set xView = Nothing

Call xDB.Commit

Set xDB = Nothing
Set xInst = Nothing

'Call MsgBox("InstallShield branding has been successfully removed from " & WScript.Arguments(0))
